<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@include file="/pages/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>广东工业大学招生办-高考录取查询</title>
	<link rel="stylesheet" type="text/css" href="${ctx}/css/reset.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/css/common.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/css/home.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/css/system.css" />
	<style>
	.wrap{
		background:#e5e5e5;
	}
	</style>
	<script type="text/javascript" src="${ctx}/js/jquery.js"></script>
	<script type="text/javascript" src="${ctx}/js/showTime.js"></script>
	<script type='text/javascript'>
    loadXML = function(xmlString){
        var xmlDoc=null;
        //判断浏览器的类型
        //支持IE浏览器 
        if(!window.DOMParser && window.ActiveXObject){   //window.DOMParser 判断是否是非ie浏览器
            var xmlDomVersions = ['MSXML.2.DOMDocument.6.0','MSXML.2.DOMDocument.3.0','Microsoft.XMLDOM'];
            for(var i=0;i<xmlDomVersions.length;i++){
                try{
                    xmlDoc = new ActiveXObject(xmlDomVersions[i]);
                    xmlDoc.async = false;
                    xmlDoc.loadXML(xmlString); //loadXML方法载入xml字符串
                    break;
                }catch(e){
                }
            }
        }
        //支持Mozilla浏览器
        else if(window.DOMParser && document.implementation && document.implementation.createDocument){
            try{
                /* DOMParser 对象解析 XML 文本并返回一个 XML Document 对象。
                 * 要使用 DOMParser，使用不带参数的构造函数来实例化它，然后调用其 parseFromString() 方法
                 * parseFromString(text, contentType) 参数text:要解析的 XML 标记 参数contentType文本的内容类型
                 * 可能是 "text/xml" 、"application/xml" 或 "application/xhtml+xml" 中的一个。注意，不支持 "text/html"。
                 */
                domParser = new  DOMParser();
                xmlDoc = domParser.parseFromString(xmlString, 'text/xml');
            }catch(e){
            }
        }
        else{
            return null;
        }

        return xmlDoc;
    }
	</script>
	<script type="text/javascript">
		$(document).ready(function(){
			
				$("#notice").load("${ctx}/base/college-notice!getNotice.action", {value:1});
           	$("#special-tips").load("${ctx}/base/college-notice!getSpecialTips.action", {value:1});
		var fullYear = new Date();
		$("#year").html(fullYear.getFullYear());
		});
		function showResult(){
		var ticket=document.admissionSearch.ticketNum.value;
			var iden=document.admissionSearch.IdNum.value;
			if(ticket==""){
			alert("准考证号不能为空！");
			return false;}
			if(iden==""){
			alert("身份证号不能为空！");
			return false;}
			
				$.post("${ctx}/base/college-detail!getInfo.action",  $("#admissionSearch").serialize()  ,function callback(text){
				if(text !="0"){
					xmlDoc = loadXML(text);
	            	var elements = xmlDoc.getElementsByTagName("root");
		                $('#name').text( elements[0].getElementsByTagName("name")[0].firstChild.nodeValue);
		                $('#detailname').text( elements[0].getElementsByTagName("name")[0].firstChild.nodeValue);
		                $('#ticketNum').text( elements[0].getElementsByTagName("ticketNum")[0].firstChild.nodeValue);
		                $('#major').text( elements[0].getElementsByTagName("major")[0].firstChild.nodeValue);
		                $('#academy').text( elements[0].getElementsByTagName("academy")[0].firstChild.nodeValue);
		                $('#ems').text( elements[0].getElementsByTagName("ems")[0].firstChild.nodeValue);
		                $('#content').text(elements[0].getElementsByTagName("content")[0].firstChild.nodeValue);
				}
				else
					alert("无相关录取信息,请检查信息是否输入正确,是否包含空格或在下方查找相应省份的录取分数线！");
            });
           
			
		}
		
		
            
	</script>
</head>
<body>
	<div class="wrap">
		<!--header-->
		<jsp:include page="../../../header.jsp" flush="true" />
		<!--main-content-->
		<div class="w960 auto main-content">
			<div class="input-message">
				<div class="input-message-title f20 tc pt20 pb10"><span id="year"></span>年录取情况查询</div>
				<div class="input-message-txt auto tc f14">
					<form name="admissionSearch" id="admissionSearch" action="#" method="post">
						准考证号：<input type="text" name="ticketNum" />
						身份证号：<input type="text" name="IdNum"/>
						<input type="button"  onclick="showResult()" value="查询" class="button"/>
					</form>
				</div>
			</div>			
			<div class="score-search auto pt20 tc f14 pb20">
					<div>
					   <table class="score-table">
					    <tr class="score-line">
						<th>
						<span id="procontent"></span>
						</th>
                         </tr>
					   </table>
					</div>
			</div>	
			<span class="procontent"></span>
			<div class="user-message-detail auto mt20 tc f14 mb20">
				<span id="name" style="font-weight:bold;font-size:20px;color:blue"></span>同学，祝贺您考取广东工业大学！<br />
				您的录取详情如下：
				<table class="gaokao-table">
					<tr><th>准考证</th>
						<th>姓名</th>
						<th>录取专业</th>
						<th>所属学院</th>
						<th>快递单号（EMS）</th>
						<th>备注</th></tr>
					<tr><td style="font-weight:bold;font-size:16px" id="ticketNum" ></td>
					<td style="font-weight:bold;font-size:16px" id="detailname">
					</td><td style="font-weight:bold;font-size:16px" id="major"></td>
					<td style="font-weight:bold;font-size:16px" id="academy" ></td>
					<td style="font-weight:bold;font-size:16px" id="ems" ></td>
					<td style="font-weight:bold;font-size:16px" id="content" ></td></tr>
				</table>
			</div>
			<div class="tips-message auto f14">
				<div class="red pt10">特别提示</div>
				<div id="special-tips" ></div>
				<div class="red pt10">录取情况公告</div>
				<div id="notice" ></div>
			</div>
			<div class="schoolpic r"></div>
			<div class="clearfix"></div>
		</div>
	</div>
</body>
</html>